<link type="text/css" href="/admins/js/pagerView/pager-view.css" rel="stylesheet" />
<link type="text/css" href="/admins/js/jquery/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/admins/js/jquery/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="/admins/js/jquery/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="/admins/js/pagerView/pager-view.js"></script>

<form action="/admini/manageuser/email/" method="get" style="margin:0px" id="form1">
    <div style=" border:1px solid #DDDDDD; padding:2px; margin:2px;" id='sel'>
        <label for="member">用户：</label><input type="text" id="username" name="username" value="<?php echo $this->username; ?>" />
        <input type="submit" id="queryButton" value="查询"/>
    </div>
</form>
    <div class="dataTable">
        <table>  
            <tfoot>
             <tr><td colspan="14">
                     <button class="button" id="release-button" style="background-color: #FF8312;width: 80px;height: 30px;color: white;font-size: 14px;border-radius:8px;">发送邮件</button>
                 </td></tr>
            </tfoot>
            <tr>
                <th class="w6" width="2%">&nbsp;</th>
                <th class="w1" width="2%">序号</th>
                <th class="w2" width="8%">用户</th>	
                <th class="w3" width="30%">标题</th>
                <th class="w4" width="800px">内容</th>
                <th class="w5" width="5%">状态</th>
            </tr>  
        
            <?php if($this->emailalllist != ''){
                foreach ($this->emailalllist as $Item) { ?> 
                <tr>
                    <td class="w6" nowrap align="center"><input type="radio" name="email" class="email"  value="<?php echo $Item->id; ?>" /></td>
                    <td class="w1" nowrap align="center"><?php echo $Item->id; ?></td>
                    <td class="w2" nowrap align="center"><?php echo $Item->userinfo!=null?$Item->userinfo->nikename:"用户出错"; ?></td>
                    <td class="w3" nowrap><?php echo $Item->title;?></td>
                    <td class="w4" width="900px"><?php echo $Item->content; ?></td>
                    <td class="w5" nowrap align="center"><?php echo $Item->status==1?"已发":"未发"; ?></td>
                 </tr>         
            <?php } }?>
        </table>
    </div>                
    <div class="toolbar">
        <?php echo $this->partial('paging.phtml', array("pages" => $this->mailall,"pamas"=>"username=".$this->username)); ?>
    </div>   
<script type="text/javascript">
   $('#release-button').click(function(){
        id=$(".email:checked").val();
        location.href='/admini/manageuser/sendemail/id/'+id;
    });
</script>